package com.yoso.springcloud.controller;

import com.yoso.springcloud.domain.CommonResult;
import com.yoso.springcloud.domain.Payment;
import com.yoso.springcloud.service.PaymentFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description:
 * @Date: 2021/10/14 11:20
 */
@RestController
public class OrderFeignController {
    @Resource
    private PaymentFeignService paymentFeignService;

    @PostMapping("/consumer/payment/save")
    public CommonResult<Payment> save(Payment payment){
        return paymentFeignService.save(payment);
    }
    @GetMapping("/consumer/payment/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id){
        return paymentFeignService.getPaymentById(id);
    }
}
